}
struct wpt* wpt = &(wprdata->wpt[idx]);
- Waypoint* WP = new Waypoint;
+ auto* WP = new Waypoint;
WP->latitude = -pt2deg(wpt->pt.y);
WP->longitude = pt2deg(wpt->pt.x);
WP->SetCreationTime(unpack_time(wpt->date, wpt->time));
/* track points */
struct trklog* trklog = &(trldata.trklog[i]);
for (j=0; j<trkhdr->totalpt; j++) {
- Waypoint* WP = new Waypoint;
+ auto* WP = new Waypoint;
WP->latitude = -pt2deg(trklog->pt[j].y);
WP->longitude = pt2deg(trklog->pt[j].x);
WP->altitude = hgt2m(trklog->sh[j].height);
for (unsigned long i = 0; i < count; i++) {
an1_waypoint_record* rec = Alloc_AN1_Waypoint();
Read_AN1_Waypoint(f, rec);
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
if (rec->creation_time) {
wpt_tmp->SetCreationTime(rec->creation_time);
Read_AN1_Vertex(f, vert);
/* create route point */
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = DecodeOrd(vert->lat);
wpt_tmp->longitude = -DecodeOrd(vert->lon);
wpt_tmp->shortname = QString::asprintf("\\%5.5lx", rtserial++);
gbfile* file_in = gbfopen(arcfileopt, "r", MYNAME);
- Waypoint* arcpt1 = new Waypoint;
- Waypoint* arcpt2 = new Waypoint;
+ auto* arcpt1 = new Waypoint;
+ auto* arcpt2 = new Waypoint;
arcdist_arc_disp_hdr_cb(nullptr);
arcpt2->latitude = arcpt2->longitude = BADVAL;
fatal(MYNAME ": structure error at %s (Coordinates)!\n", station);
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = station;
bcr_mercator_to_wgs84(mlat, mlon, &wpt->latitude, &wpt->longitude);
linepart(lat_orig, long_orig, lat_orig_adj, long_orig_adj, frac,
&lat_dest, &long_dest);
- Waypoint* wpt_dest = new Waypoint(*wpt_orig);
+ auto* wpt_dest = new Waypoint(*wpt_orig);
wpt_dest->latitude = DEG(lat_dest);
wpt_dest->longitude = DEG(long_dest);
if (wpt_orig_prev == nullptr) {
if (wpt_orig != nullptr) {
- Waypoint* waypoint_dest = new Waypoint(*wpt_orig);
+ auto* waypoint_dest = new Waypoint(*wpt_orig);
route_add_wpt(route_dest, waypoint_dest);
}
} else {
if (is_small_angle(lat_orig, long_orig, lat_orig_prev,
long_orig_prev, lat_orig_next, long_orig_next)) {
- Waypoint* waypoint_dest = new Waypoint(*wpt_orig);
+ auto* waypoint_dest = new Waypoint(*wpt_orig);
route_add_wpt(route_dest, waypoint_dest);
} else {
Waypoint* wpt_dest_prev = create_wpt_dest(wpt_orig,
}
if (wpt_orig != nullptr) {
- Waypoint* waypoint_dest = new Waypoint(*wpt_orig);
+ auto* waypoint_dest = new Waypoint(*wpt_orig);
route_add_wpt(route_dest, waypoint_dest);
}
}
static void
bushnell_read()
{
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
int32_t lat_tmp = gbfgetint32(file_in);
int32_t lon_tmp = gbfgetint32(file_in);
break;
}
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = lat_tmp / 10000000.0;
wpt_tmp->longitude = lon_tmp / 10000000.0;
{
int col = -1;
char* cx;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
struct tm tm;
int has_time = 0;
memset(&tm, 0, sizeof(tm));
{
int col = -1;
struct tm tm;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
char* c = strstr(buff, "A ");
if (c == buff) {
track_add_head(track_head);
while (gbfread(&gp, sizeof(gp), 1, gplfile_in) > 0) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = le_read_double(&gp.lat);
wpt_tmp->longitude = le_read_double(&gp.lon);
double alt_feet = le_read_double(&gp.alt);
count++;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = read_wcstr();
wpt->notes = read_wcstr(); /* comment */
count++;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = read_wcstr();
wpt->notes = read_wcstr();
break;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->longitude = gbfgetdbl(fin);
wpt->latitude = gbfgetdbl(fin);
track_add_head(*track);
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
float latitude = bin2deg(lat);
if (latitude >= 100) {
manual_point = 1;
datum = read_datum(fin);
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = gbfgetdbl(fin);
wpt->longitude = gbfgetdbl(fin);
gbfungetc(i, fin);
datum = read_datum(fin);
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = gbfgetdbl(fin);
wpt->longitude = gbfgetdbl(fin);
while (wcount > 0) {
wcount--;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = gbfgetdbl(fin);
wpt->longitude = gbfgetdbl(fin);
int p;
char ibuf[10];
do {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
UrlLink link;
for (int tag = gbfgetc(file_in); tag != 0xff; tag = gbfgetc(file_in)) {
route_add_head(route);
while (1 == gbfread(&ewpt, sizeof(ewpt), 1, file_in)) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = enigmaPositionToDec(le_read32(&ewpt.latitude));
wpt->longitude = enigmaPositionToDec(le_read32(&ewpt.longitude));
char*sn = xstrndup(ewpt.shortname, ewpt.shortname_len);
return nullptr;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = unknown_alt;
wpt->longitude = unknown_alt;
&& velocityMark == 'M') {
// create the Waypoint and fill it in
- Waypoint* readWaypoint = new Waypoint;
+ auto* readWaypoint = new Waypoint;
QDateTime dt = QDateTime(QDate(year, mon, mday), QTime(hour, min, sec), Qt::UTC);
readWaypoint->SetCreationTime(dt);
char* cin;
struct tm tm;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
garmin_fs_p gmsd = garmin_fs_alloc(-1);
fs_chain_add(&wpt->fs, (format_specific_data*) gmsd);
static Waypoint*
parse_trkpt(char* buff)
{
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
garmin_fs_p gmsd = garmin_fs_alloc(-1);
fs_chain_add(&wpt->fs, (format_specific_data*) gmsd);
GPS_PWay* way = nullptr;
if (getposn) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = gps_save_lat;
wpt->longitude = gps_save_lon;
wpt->shortname = "Position";
}
for (int i = 0; i < n; i++) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->shortname = QString::fromLatin1(way[i]->ident);
wpt_tmp->description = QString::fromLatin1(way[i]->cmnt);
if (array[i]->no_latlon || array[i]->ishdr) {
continue;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->longitude = array[i]->lon;
wpt->latitude = array[i]->lat;
if (array[i]->islink) {
continue;
} else {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = array[i]->lat;
wpt_tmp->longitude = array[i]->lon;
wpt_tmp->shortname = array[i]->ident;
static Waypoint*
pvt_read(posn_status* posn_status)
{
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
GPS_PPvt_Data pvt = GPS_Pvt_New();
if (GPS_Command_Pvt_Get(&pvt_fd, &pvt)) {
garmin_fs_t*
garmin_fs_alloc(const int protocol)
{
- garmin_fs_t* result = new garmin_fs_t;
+ auto* result = new garmin_fs_t;
result->fs.type = FS_GMSD;
result->fs.copy = (fs_copy) garmin_fs_copy;
result->fs.destroy = garmin_fs_destroy;
res += 10; /* tag(4) */
}
- gpi_waypt_t* dt = new gpi_waypt_t;
+ auto* dt = new gpi_waypt_t;
wpt->extra_data = dt;
if (alerts) {
}
}
- Waypoint* wpt = new Waypoint(*ref);
+ auto* wpt = new Waypoint(*ref);
if (*opt_unique == '1') {
wpt->shortname = mkshort(short_h, wpt->shortname);
bind_fields(waypt_header);
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
garmin_fs_p gmsd = garmin_fs_alloc(-1);
fs_chain_add(&wpt->fs, (format_specific_data*) gmsd);
int column = -1;
bind_fields(trkpt_header);
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
while ((str = csv_lineparse(nullptr, "\t", "", column++))) {
double x;
double AltF = (double)uu * GARMIN_XT_ELE - 1500;
//create new waypoint
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
//populate wpt;
wpt->latitude = LatF*180/16777216; /* Degrees */
for (int i = 0; i < points; i++) {
char buf[128];
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
rtept_ct++;
wpt->shortname = fread_cstr(); /* shortname */
int points = FREAD_i32;
for (int index = 0; index < points; index++) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
trkpt_ct++;
wpt = read_waypoint(&wpt_class);
if ((gdb_via == 0) || (wpt_class == 0)) {
waypt_add(wpt);
- Waypoint* dupe = new Waypoint(*wpt);
+ auto* dupe = new Waypoint(*wpt);
wayptq_in.append(dupe);
} else {
wayptq_in_hidden.append(wpt);
if (test == nullptr) {
int display;
- Waypoint* wpt = new Waypoint(*refpt);
+ auto* wpt = new Waypoint(*refpt);
gdb_check_waypt(wpt);
wayptq_out.append(wpt);
memset(&tm, 0, sizeof(tm));
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
int deg = (int16_t) le_read16(&buf[0]);
int min = le_read16(&buf[2]);
printf(" PwrCadense:%d Power:%d\n", point.PwrCadence,point.Power);
}
- Waypoint* wpt = new Waypoint(); // waypt_new();
+ auto* wpt = new Waypoint(); // waypt_new();
//wpt->creation_time = mkgmtime(&gpstime);
wpt->SetCreationTime(gpsbabeltime);
wpt->longitude = ((int32_t) point.Longitude) / 1000000.0;
fatal(MYNAME ": Unexpected EOF (end of file)!\n");
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->SetCreationTime(le_read32(&rec.time));
wpt->latitude = le_read_float(&rec.lat);
lon += decode_goog64(qbstr, qbpos);
{
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = lat / 100000.0;
wpt_tmp->longitude = lon / 100000.0;
route_add_wpt(routehead, wpt_tmp);
if ((nfields == 8) && (tx == 0)) {
// fatal(MYNAME ": Invalid date in filename \"%s\", try to set manually using \"date\" switch!\n", buff);
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
int column = -1;
// the format of gopal is quite simple. Unfortunately the developers forgot the date as the first element...
rtrim(sn);
rtrim(desc);
rtrim(icon);
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->altitude = alt;
wpt_tmp->shortname = sn;
xfree(sn);
/* Add the first point of an ActivityLap as
a waypoint as well as a trackpoint. */
char cbuf[10];
- Waypoint* wpt_lap_s = new Waypoint(*wpt_tmp);
+ auto* wpt_lap_s = new Waypoint(*wpt_tmp);
snprintf(cbuf, sizeof(cbuf), "LAP%03d", lap_ct);
wpt_lap_s->shortname = cbuf;
waypt_add(wpt_lap_s);
/* Get the waypoints */
for (int iCount = 0; iCount < iWptNum ; iCount ++) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
int iWptIndex = le_read16(&((WPTHDR*)HxWpt)->idx[iCount]);
WPT* pWptHxTmp = (WPT*)&HxWpt[OFFS_WPT + (sizeof(WPT) * iWptIndex)];
/* All right! Copy the data to the gpsbabel struct... */
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
// Could probably find a way to eliminate the alloc/copy.
char* s = xstrndup(w.name, sizeof(w.name));
/* We create one wpt for the info in the header */
- Waypoint* first_wpt = new Waypoint;
+ auto* first_wpt = new Waypoint;
double g_lat = gudermannian_i1924(accum_north);
first_wpt->latitude = geocentric_to_geodetic_hwr(g_lat);
first_wpt->longitude = accum_east/EAST_SCALE * 180.0;
track_add_wpt(trk, first_wpt);
for (int i = 0 ; i<th.num_points-1 ; i++) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
points[i].depth = be_read16(&points[i].depth);
points[i].deltaeast = be_read16(&points[i].deltaeast);
/* We create one wpt for the info in the header */
- Waypoint* first_wpt = new Waypoint;
+ auto* first_wpt = new Waypoint;
double g_lat = gudermannian_i1924(accum_north);
first_wpt->latitude = geocentric_to_geodetic_hwr(g_lat);
first_wpt->longitude = accum_east/EAST_SCALE * 180.0;
track_add_wpt(trk, first_wpt);
for (int i = 0 ; i<th.num_points-1 ; i++) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
points[i].deltaeast = be_read16(&points[i].deltaeast);
points[i].deltanorth = be_read16(&points[i].deltanorth);
fatal(MYNAME ": task waypoint (C) record parse error\n%s", rec);
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = ('N' == lat_hemi[0] ? 1 : -1) *
(lat_deg + (lat_min * 1000 + lat_frac) / 1000.0 / 60);
while (in_point_count &&
gbfread(&point, sizeof(point), 1, igo8_file_in) > 0) {
in_point_count--;
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = le_read32(&point.lat) / (double)0x800000;
wpt_tmp->longitude = le_read32(&point.lon) / (double)0x800000;
for (unsigned int timen = time1+interval;
timen < wpt->creation_time.toTime_t();
timen += interval) {
- Waypoint* wpt_new = new Waypoint(*wpt);
+ auto* wpt_new = new Waypoint(*wpt);
wpt_new->SetCreationTime(timen);
wpt_new->shortname = QString();
wpt_new->description = QString();
for (double distn = dist;
distn < curdist;
distn += dist) {
- Waypoint* wpt_new = new Waypoint(*wpt);
+ auto* wpt_new = new Waypoint(*wpt);
frac = distn / curdist;
wpt_new->SetCreationTime(frac * (wpt->creation_time.toTime_t() - time1) + time1);
wpt_new->shortname = QString();
static Waypoint*
to_waypoint(itracku_data_record* d)
{
- Waypoint* wp = new Waypoint;
+ auto* wp = new Waypoint;
wp->longitude = deg_min_to_deg(le_read32(d->longitude));
wp->latitude = deg_min_to_deg(le_read32(d->latitude));
wp->SetCreationTime(decode_itracku_time(le_read32(d->creation_time)));
dmy = dmy / 100;
tm.tm_mday = dmy;
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
WAYPT_SET(waypt, speed, KNOTS_TO_MPS(speed));
static void
jogmap_marker(xg_string, const QXmlStreamAttributes* attrv)
{
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
if (attrv->hasAttribute("lat")) {
wpt->latitude = attrv->value("lat").toString().toDouble();
continue;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = lat;
wpt->longitude = lon;
// In gx:Track elements all kml:when elements are required to precede all gx:coord elements.
// For both we allow any order. Many writers using gx:Track elements don't adhere to the schema.
while (!gx_trk_times->isEmpty()) {
- Waypoint* trkpt = new Waypoint;
+ auto* trkpt = new Waypoint;
trkpt->SetCreationTime(gx_trk_times->takeFirst());
double lat, lon, alt;
int n;
}
for (int i = 0; i < NumWaypoints && !gbfeof(file_in); i++) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
switch (reading_version) {
case 2:
/* waypoints */
for (int j = 0; j < num_legs; j++) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
if (global_opts.debug_level == 99) {
printf(MYNAME " parse_route:");
}
int icon_number = gbfgetint32(file_in);
if (opt_ignoreicons == nullptr) { /* Option not specified if NULL */
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
/* position coord lat & long */
wpt_tmp->latitude = latitude;
}
for (int j = 0; j < num_section_points && !gbfeof(file_in); j++, num_trail_points--) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in));
wpt_tmp->longitude = lon_mm_to_deg(gbfgetint32(file_in));
}
}
for (int j = 0; j < num_trail_pts; ++j) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
/* Some unknown bytes */
gbfgetint16(file_in);
buff += 9; /* skip field no. 1 */
int fld = 1;
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
geocache_data* gcdata = wpt_tmp->AllocGCData();
while ((s = csv_lineparse(buff, ",", "", fld++))) {
int fracsecs;
struct tm tm;
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
memset(&tm, 0, sizeof(tm));
*p = '\0';
}
- mag_rte_elem* rte_elem = new mag_rte_elem;
+ auto* rte_elem = new mag_rte_elem;
rte_elem->wpt_name = next_stop;
rte_elem->wpt_icon = abuf;
*/
foreach (const Waypoint* waypt, rte_wpt_tmp) {
if (waypt->shortname == re->wpt_name) {
- Waypoint* wpt = new Waypoint(*waypt);
+ auto* wpt = new Waypoint(*waypt);
route_add_wpt(rte_head, wpt);
break;
}
descr[0] = 0;
icon_token[0] = 0;
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
sscanf(trkmsg,"$PMGNWPL,%lf,%c,%lf,%c,%d,%c,%[^,],%[^,]",
&latdeg,&latdir,
continue;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = lat;
wpt->longitude = lon;
int longitude = gbfgetint32(fin);
int latitude = gbfgetint32(fin);
- Waypoint* ret = new Waypoint;
+ auto* ret = new Waypoint;
ret->latitude = double(latitude)/DIV_RATE;
ret->longitude = double(longitude)/DIV_RATE;
unsigned int trk_count = gbfgetuint32(mapsend_file_in);
while (trk_count--) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->longitude = gbfgetdbl(mapsend_file_in);
wpt_tmp->latitude = -gbfgetdbl(mapsend_file_in);
static void
mps_wpt_q_add(QList<Waypoint *>* whichQueue, const Waypoint* wpt)
{
- Waypoint* written_wpt = new Waypoint(*wpt);
+ auto* written_wpt = new Waypoint(*wpt);
whichQueue->append(written_wpt);
}
double mps_proximity = unknown_alt;
double mps_depth = unknown_alt;
- Waypoint* thisWaypoint = new Waypoint;
+ auto* thisWaypoint = new Waypoint;
*wpt = thisWaypoint;
mps_readstr(mps_file, wptname, sizeof(wptname));
DBG((sobj, "track has %d point(s)\n", tp));
for (int ctp = 0; ctp < tp; ctp++) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = gbfgetdbl(fin);
wpt->longitude = gbfgetdbl(fin);
static route_head* trk_head = nullptr;
static int add_trackpoint(int idx, unsigned long bmask, struct data_item* itm)
{
- Waypoint* trk = new Waypoint;
+ auto* trk = new Waypoint;
if (global_opts.masked_objective& TRKDATAMASK && (trk_head == nullptr || (mtk_info.track_event & MTK_EVT_START))) {
char spds[50];
)
) {
/* Button press -- create waypoint, start count at 1 */
- Waypoint* w = new Waypoint(*trk);
+ auto* w = new Waypoint(*trk);
w->shortname = QString::asprintf("WP%06d", waypt_count()+1);
waypt_add(w);
return;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = val_lat;
wpt->longitude = val_lon;
NaviReadCache(const QXmlStreamReader& reader)
{
const QXmlStreamAttributes a = reader.attributes();
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
geocache_data* gc_data = wpt_tmp->AllocGCData();
if (a.hasAttribute("cache_id")) {
int n = a.value("cache_id").toString().toInt();
for (int n = 0; n < nof_wp; ++n) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
/* Read waypoint data */
static Waypoint*
decode_waypoint(const unsigned char* buffer)
{
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
decode_position(buffer + 12, waypt);
char* s = xstrdup((char*)buffer + 4);
static Waypoint*
decode_trackpoint(const unsigned char* buffer)
{
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
decode_position(buffer + 12, waypt);
waypt->SetCreationTime(decode_datetime(buffer + 22));
Waypoint*
navilink_decode_logpoint(const unsigned char* buffer)
{
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
waypt->hdop = (buffer[0]) * 0.2f;
waypt->sat = buffer[1];
int lon = gbfgetint32(fin);
int lat = gbfgetint32(fin);
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = GPS_Math_Semi_To_Deg(lat & 0x7FFFFFFF);
wpt->longitude = GPS_Math_Semi_To_Deg(lon);
continue;
}
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
if (stealth) {
if (!snmac) {
/* for a quiet compiler */
QString zip1 = zip2 = city = street = number = QString();
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
int column = -1;
QString c = csv_lineparse(str, "|", "", column++);
if (waypoints.contains(atstr)) {
const Waypoint* ctmp = waypoints.value(atstr);
- Waypoint* tmp = new Waypoint(*ctmp);
+ auto* tmp = new Waypoint(*ctmp);
route_add_wpt(rte, tmp);
} else {
warning(MYNAME ": Way reference id \"%s\" wasn't listed under nodes!\n", qPrintable(atstr));
if (buff.contains(',')) {
bool ozi_fsdata_used = false;
ozi_fsdata* fsdata = ozi_alloc_fsdata();
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
/* data delimited by commas. */
const QStringList parts = buff.split(',');
tm.tm_min = le_readu16(&bc.minute);
tm.tm_sec = le_readu16(&bc.second);
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = le_read_float(&bc.latitude);
wpt->longitude = le_read_float(&bc.longitude);
wpt->altitude = FEET_TO_METERS(le_read_float(&bc.altitude));
break;
}
linecount++;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
char* s = buff;
s = csv_lineparse(s, "\\w", "", linecount);
if (!s) {
psit_waypoint_r(gbfile* psit_file, Waypoint**)
{
if (strlen(psit_current_token) > 0) {
- Waypoint* thisWaypoint = new Waypoint;
+ auto* thisWaypoint = new Waypoint;
thisWaypoint->latitude = atof(psit_current_token);
while (psit_isKnownToken(psit_current_token) != 0) {
if (strlen(psit_current_token) > 0) {
- Waypoint* thisWaypoint = new Waypoint;
+ auto* thisWaypoint = new Waypoint;
thisWaypoint->latitude = atof(psit_current_token);
while (psit_isKnownToken(psit_current_token) != 0) {
if (strlen(psit_current_token) > 0) {
- Waypoint* thisWaypoint = new Waypoint;
+ auto* thisWaypoint = new Waypoint;
thisWaypoint->latitude = atof(psit_current_token);
break;
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = name;
wpt->latitude = lat.toDouble();
wpt->longitude = lon.toDouble();
static Waypoint*
decode_sbn_record(unsigned char* buffer)
{
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
if (is_sbn_valid(buffer)) {
waypt->fix = decode_sbn_mode(buffer + 3);
fatal(MYNAME ": Incomplete line!\n");
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = atof(str + 21);
if (str[20] == 'S') {
static Waypoint*
make_trackpoint(struct read_state* st, double lat, double lon, double alt)
{
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = QString::asprintf("TP%04d", ++st->tpn);
} else {
ECEF_to_LLA(ecef_x, ecef_y, ecef_z, &lat, &lng, &alt);
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = QString::asprintf("POI_%s", poinames[poi]);
wpt->description = QString::asprintf("miniHomer points to this coordinates if the %s symbol is on", poinames[poi]);
wpt->latitude = lat;
if (route != nullptr) {
if ((via != 0) || (routevia == nullptr)) {
- Waypoint* wpt = new Waypoint(*wpt_tmp);
+ auto* wpt = new Waypoint(*wpt_tmp);
route_add_wpt(route, wpt);
}
}
teletype_read()
{
for (uint32_t i = 0; i < tty_wpt_count; i++) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->shortname = (gbfgetcstr(fin));
wpt->description = (gbfgetcstr(fin));
}
if (sscanf(ibuf, "%lf,%lf:%100[^:]:%100[^\n]",
&lon, &lat, icon, desc)) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->longitude = lon;
wpt_tmp->latitude = lat;
/* skip the line if it contains "sHyperLink" as it is a header (I hope :) */
if ((strlen(buff)) && (strstr(buff, "sHyperLink") == nullptr)) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
/* data delimited by tabs, not enclosed in quotes. */
char* s = buff;
while (pointcount--) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
/* pascal-like shortname */
wpt_tmp->shortname = gbfgetpstr(tpg_file_in);
/* multiply all the deltas by the scaling factors to determine the waypoint positions */
for (int j = 0; j < waypoint_count; j++) {
- Waypoint* waypoint_temp = new Waypoint;
+ auto* waypoint_temp = new Waypoint;
double amt;
/* convert incoming NAD27/CONUS coordinates to WGS84 */
GPS_Math_Known_Datum_To_WGS84_M(
//
static Waypoint* tpo_convert_ll(int lat, int lon)
{
- Waypoint* waypoint_temp = new Waypoint;
+ auto* waypoint_temp = new Waypoint;
double latitude = (double)lat / 0x800000;
double longitude = (double)lon / 0x800000;
// For routes (later), we need a duplicate of each waypoint
// indexed by the order we read them in.
- Waypoint* waypoint_temp2 = new Waypoint(*waypoint_temp);
+ auto* waypoint_temp2 = new Waypoint(*waypoint_temp);
// Attach the copy to our index
tpo_wp_index[tpo_index_ptr++] = waypoint_temp2;
//printf("val: %x\t\t", val);
// Duplicate a waypoint from our index of waypoints.
- Waypoint* waypoint_temp = new Waypoint(*tpo_wp_index[val-1]);
+ auto* waypoint_temp = new Waypoint(*tpo_wp_index[val-1]);
// Add the waypoint to the route
route_add_wpt(route_temp, waypoint_temp);
void TransformFilter::transform_any_disp_wpt_cb(const Waypoint* wpt)
{
- Waypoint* temp = new Waypoint(*wpt);
+ auto* temp = new Waypoint(*wpt);
if (current_target == 'R') {
route_add_wpt(current_rte, temp, current_namepart, name_digits);
} else if (current_target == 'T') {
int ns = 1;
int ew = 1;
geocache_data* gc_data = nullptr;
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = unicsv_unknown;
wpt->longitude = unicsv_unknown;
memset(&ymd, 0, sizeof(ymd));
line.bas.cr = 0; /* null terminate vox field */
}
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
/* lat is a string in the form: 31.768380N */
char c = line.bas.common.latitude_NS; /* N/S */
// thread on gpsbabel-misc with Jamie Robertson.
assert(line.bas.common.tag == 'C' || line.bas.common.tag == 'G' ||
line.bas.common.tag == 'V');
- Waypoint* wpt2 = new Waypoint(*wpt);
+ auto* wpt2 = new Waypoint(*wpt);
if (line.bas.common.tag == 'V') { // waypoint with voice recording?
char vox_file_name[sizeof(line.adv.vox)+5];
const char* vox = is_advanced_mode ? line.adv.vox : line.bas.vox;
route_head* trk = nullptr;
while (! gbfeof(fin)) {
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = gbfgetdbl(fin);
wpt->longitude = gbfgetdbl(fin);
unsigned char gpsvalid = gbfgetc(infile); /* fix is valid */
unsigned char gpssats = gbfgetc(infile); /* number of sats */
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude =DEG(latrad);
wpt_tmp->longitude =DEG(lonrad);
int course = gbfgetint16(infile);
int status = gbfgetint32(infile);
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
wpt_tmp->latitude= scaled_lat / vitovtt_latitudescale;
wpt_tmp->longitude= scaled_lon / vitovtt_longitudescale;
ymd /= 100;
tm.tm_year = ymd % 100 + 100;
- Waypoint* waypt = new Waypoint;
+ auto* waypt = new Waypoint;
// Lat/Lon are both stored *0xE1000 which we have to divide out
// for decimal degrees
static Waypoint* make_point(double lat, double lon, double alt, time_t tim, const char* fmt, int index)
{
char wp_name[20];
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
sprintf(wp_name, fmt, index);
char desc[255] ="\0";
if ((ap_hdop>=1)&&(ap_hdop<50)) { // Discard invalid GPS fix
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
if (snmac) {
wpt_tmp->shortname = ap_mac;
int16_t alt = gbfgetint16(fin); // Signed. Meters.
(void) flags; // Silence 'unused' warning until we use flags.
- Waypoint* wpt = new Waypoint;
+ auto* wpt = new Waypoint;
wpt->latitude = latitude / 1.0e7;
wpt->longitude = longitude / 1.0e7;
wpt->SetCreationTime(wintec_date_to_time(date));
// Wintec's software puts a waypoint in the track, so we
// mock that.
if (flags & 0x02) {
- Waypoint* temp = new Waypoint(*wpt);
+ auto* temp = new Waypoint(*wpt);
waypt_add(temp);
}
}
}
if (!buff.isEmpty()) {
- Waypoint* wpt_tmp = new Waypoint;
+ auto* wpt_tmp = new Waypoint;
// initialize parse data for accumulation of line results from all fields in this line.
xcsv_parse_data parse_data;
const QStringList values = csv_linesplit(buff, xcsv_style->field_delimiter,
return;
}
- xml_tag* res = new xml_tag;
+ auto* res = new xml_tag;
*copy = res;
res->tagname = (src->tagname);
*copy = nullptr;
return;
}
- fs_xml* res = new fs_xml;
+ auto* res = new fs_xml;
*copy = res;
res->fs = src->fs;
fs_xml* fs_xml_alloc(long type)
{
- fs_xml* result = new fs_xml;
+ auto* result = new fs_xml;
result->fs.type = type;
result->fs.copy = fs_xml_copy;
result->fs.destroy = fs_xml_destroy;